<template>
  <el-row :gutter="20" class="topheader-container">
    <el-col :span="6">
      <div class="top-card-item">
        <div class="card-left card-blue">
            <i class="iconfont icongailan"></i>
        </div>
        <div class="card-right">
          <countTo class="total" :startVal='0' :endVal='17651' :duration='3000'></countTo>
          <div class="title">Incom</div>
        </div>
      </div>
    </el-col>
    <el-col :span="6">
      <div class="top-card-item">
        <div class="card-left card-green">
             <i class="iconfont iconshejiao"></i>
        </div>
        <div class="card-right">
           <countTo class="total" :startVal='0' :endVal='651' :duration='3000'></countTo>
          <div class="title">Buyers</div>
        </div>
      </div>
    </el-col>
    <el-col :span="6">
       <div class="top-card-item">
        <div class="card-left card-red">
             <i class="iconfont iconlvzhou_zongshu"></i>
        </div>
        <div class="card-right">
          <countTo class="total" :startVal='0' :endVal='65231' :duration='3000'></countTo>
          <div class="title">Order quanity</div>
        </div>
      </div>
    </el-col>
    <el-col :span="6">
       <div class="top-card-item">
        <div class="card-left card-wraning">
             <i class="iconfont iconkehuduan"></i>
        </div>
        <div class="card-right">
          <countTo class="total" :startVal='0' :endVal='1423' :duration='3000'></countTo>
          <div class="title">Page View</div>
        </div>
      </div>
    </el-col>
  </el-row>
</template>

<script>
import countTo from 'vue-count-to';
export default {
  components:{
    countTo
  },
  data(){
    return{

    }
  }
}
</script>


<style lang="scss" scoped>
.topheader-container {
  margin: 20px 0;
  .top-card-item {
    height: 90px;
    border-radius: 8px;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    .card-left {
      flex: 1;
      text-align: center;
      line-height: 90px;
      i{
        font-size: 70px;
        color: #fff;
      }
    }
    .card-right {
      flex: 2;
      text-align: center;
      .total{
        font-size: 28px;
        font-weight: bold;
        margin-top: 10px;
        display: inline-block;
      }
      .title{
        font-size: 14px;
        margin-top: 10px;
        color: #666;
      }
    }
    .card-blue {
      background: #2d8cf0;
    }
    .card-green{
        background: #19be6b;
    }
    .card-red{
        background: #ed3f14;
    }
    .card-wraning{
        background: #ff9900;
    }
  }
}
</style>
